package org.darkforest.common.services;

import org.darkforest.model.*;
import org.darkforest.vo.TransportFeeQuery;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by valentina on 15/1/18.
 * 商户基本信息操作
 */
public interface TransportService {
    public void selectPageTransport(TransportPageBean page);
    public List createArea();
    public List<Area> getAreaList(int parentAreaId);
    public int deleteTransportAndExtend(int id);
    public int insertTransport(Transport t);
    public int insertTransportExtend(TransportExtendWithBLOBs t);
    public Transport getTransportById(int id);

    public TransportVo getTransportVoById(int id);
    public int copyTransport(int id);

    /**
     * 查询店铺运费模板
     *
     * @param storeId
     * @param area
     * @return
     */
    public BigDecimal selectStoreShipModel(Integer storeId, Address area, BigDecimal amount, BigDecimal freePrice, Integer goodsNum);

    /**
     * 根据商品运费，或运费模板，计算运费
     * @param tsParam
     * @param storeId
     * @return
     */
    public BigDecimal getTransportFee(Address address, List<TransportFeeQuery> tsParam, Integer storeId);
}
